package com.common.ui.controls;

import java.awt.Component;

import javax.swing.JScrollPane;
import javax.swing.JTree;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreeNode;

public class UtilTree 
{
	private JTree jTree;
	private JScrollPane scrollPane;
	
	public UtilTree(TreeNode rootNode)
	{
		jTree = new JTree();
		jTree.setModel(new DefaultTreeModel(rootNode));
		scrollPane = new JScrollPane(jTree);
	}
	
	public Component getComponent()
	{
		return scrollPane;
	}
}
